<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>绝对定位</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: #f49494;
            text-align: center;
            margin: 100px auto;

            position: relative;
        }

        span {
            background-color: #837d7d;
            text-align: center;

            position: absolute;
            right: 0;
            top: 0;
        }
    </style>
</head>
<body>

<div class="father">
    <div>
        这是广告
    </div>
    <span>关闭</span>
</div>
</body>
</html>
